package com.shensi.api.admin.client.market;

import com.shensi.api.admin.client.fallback.monitor.SysLogininforClientFallBack;
import com.shensi.api.admin.domian.market.dto.MarketCouponDto;
import com.shensi.common.core.annotation.Log;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.enums.BusinessType;
import com.shensi.common.core.page.TableDataInfo;
import com.shensi.common.core.utils.poi.ExcelUtil;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;


/**
 * @author mao
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = SysLogininforClientFallBack.class)
@Component
public interface MarketCouponClient {

    /**
     * 查询优惠劵管理列表
     */
    @GetMapping("/market/coupon/list")
    public TableDataInfo list(@SpringQueryMap MarketCouponDto marketCoupon);

    /**
     * 导出优惠劵管理列表
     */
    @GetMapping("/market/coupon/export")
    public AjaxResult export(@SpringQueryMap MarketCouponDto marketCoupon) ;

    /**
     * 获取优惠劵管理详细信息
     */
    @GetMapping(value = "/market/coupon/{couponId}")
    public AjaxResult getInfo(@PathVariable("couponId") Long couponId);


    /**
     * 新增优惠劵管理
     */
    @PostMapping("/market/coupon")
    public AjaxResult add(@RequestBody MarketCouponDto marketCoupon);

    /**
     * 修改优惠劵管理
     */
    @PutMapping("/market/coupon")
    public AjaxResult edit(@RequestBody MarketCouponDto marketCoupon);

    /**
     * 删除优惠劵管理
     */
    @DeleteMapping("/market/coupon/{couponIds}")
    public AjaxResult remove(@PathVariable("couponIds") Long[] couponIds) ;

}
